name := "lagom_learning"

version := "0.1"

scalaVersion := "2.13.1"

val macwire = "com.softwaremill.macwire" %% "macros" % "2.3.3" % "provided"
val scalaTest = "org.scalatest" %% "scalatest" % "3.1.1" % Test

lazy val `hello-world` = (project in file("."))
  .aggregate(`hello-world-api`,`hello-world-impl`,`hello-world-stream-api`,`hello-world-stream-impl`)

lazy val `hello-world-api` = (project in file("hello-world-api"))
  .settings(
    libraryDependencies ++= Seq(
      lagomScaladslApi
    )
  )

lazy val `hello-world-impl` = (project in file("hello-world-impl"))
  .enablePlugins(LagomScala)
  .settings(
    libraryDependencies ++= Seq(
      lagomScaladslPersistenceCassandra,
      lagomScaladslKafkaBroker,
      lagomScaladslTestKit,
      macwire,
      scalaTest,
      lagomScaladslKafkaClient,
      "org.apache.commons" % "commons-lang3" % "3.6",
      "commons-io" % "commons-io" % "2.5",
      "com.github.tototoshi" %% "scala-csv" % "1.3.6",
      "com.lightbend.akka" %% "akka-stream-alpakka-csv" % "2.0.1"
    )
  )
  .settings(lagomForkedTestSettings)
  .dependsOn(`hello-world-api`)

lazy val `hello-world-stream-api` = (project in file("hello-world-stream-api"))
  .settings(
    libraryDependencies ++= Seq(
      lagomScaladslApi
    )
  )

lazy val `hello-world-stream-impl` = (project in file("hello-world-stream-impl"))
  .enablePlugins(LagomScala)
  .settings(
    libraryDependencies ++= Seq(
      lagomScaladslTestKit,
      macwire,
      scalaTest
    )
  )
  .dependsOn(`hello-world-stream-api`, `hello-world-api`)
